import cv2
image =cv2.imread('sobel.png',cv2.IMREAD_GRAYSCALE)
sobelx=cv2.soble(image,cv2.CV_64F,1,0)
sobelY=cv2.soble(image,cv2.CV_64F,0,1)
graf_x=cv2.convertScaleAbs(sobelx)

graf_y=cv2.convertScaleAbs(sobely)
sobelxy=cv2.addWeighted(graf_x,0.5,graf_y,0.5,0)
cv2.imshow(image )
cv2.imshow(sobelx )
cv2.imshow(graf_x )
cv2.imshow(graf_y)
cv2.imshow(sobelY )
cv2.waitKey()
cv2.destroyWindow()